package com.aaa.system.controller;

import com.aaa.entity.User;
import com.aaa.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @program: aaa-his-parent
 * @description:
 * @author: 闫克起2
 * @create: 2023-12-07 12:06
 **/
@RestController
@RequestMapping("/system/user")
public class UserController {

    @Autowired
    private UserService userService;


    @GetMapping("selectUserByPhone/{phone}")
    public User selectUserByPhone(@PathVariable String phone){
        User user = userService.findUserByPhone(phone);
        return user;
    }

    @PostMapping("getUser")
    public List<User> getUser(@RequestBody Map<String,Object> params){
        return userService.findUser(params);
    }
}
